{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 90,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "from sklearn.model_selection import train_test_split\n",
    "from sklearn.svm import SVC\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 91,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>编号</th>\n",
       "      <th>色泽</th>\n",
       "      <th>根蒂</th>\n",
       "      <th>敲声</th>\n",
       "      <th>纹理</th>\n",
       "      <th>脐部</th>\n",
       "      <th>触感</th>\n",
       "      <th>密度</th>\n",
       "      <th>含糖率</th>\n",
       "      <th>好瓜</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>青绿</td>\n",
       "      <td>蜷缩</td>\n",
       "      <td>浊响</td>\n",
       "      <td>清晰</td>\n",
       "      <td>凹陷</td>\n",
       "      <td>硬滑</td>\n",
       "      <td>0.697</td>\n",
       "      <td>0.460</td>\n",
       "      <td>是</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>乌黑</td>\n",
       "      <td>蜷缩</td>\n",
       "      <td>沉闷</td>\n",
       "      <td>清晰</td>\n",
       "      <td>凹陷</td>\n",
       "      <td>硬滑</td>\n",
       "      <td>0.774</td>\n",
       "      <td>0.376</td>\n",
       "      <td>是</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>乌黑</td>\n",
       "      <td>蜷缩</td>\n",
       "      <td>浊响</td>\n",
       "      <td>清晰</td>\n",
       "      <td>凹陷</td>\n",
       "      <td>硬滑</td>\n",
       "      <td>0.634</td>\n",
       "      <td>0.264</td>\n",
       "      <td>是</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>青绿</td>\n",
       "      <td>蜷缩</td>\n",
       "      <td>沉闷</td>\n",
       "      <td>清晰</td>\n",
       "      <td>凹陷</td>\n",
       "      <td>硬滑</td>\n",
       "      <td>0.608</td>\n",
       "      <td>0.318</td>\n",
       "      <td>是</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>浅白</td>\n",
       "      <td>蜷缩</td>\n",
       "      <td>浊响</td>\n",
       "      <td>清晰</td>\n",
       "      <td>凹陷</td>\n",
       "      <td>硬滑</td>\n",
       "      <td>0.556</td>\n",
       "      <td>0.215</td>\n",
       "      <td>是</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   编号  色泽  根蒂  敲声  纹理  脐部  触感     密度    含糖率 好瓜\n",
       "0   1  青绿  蜷缩  浊响  清晰  凹陷  硬滑  0.697  0.460  是\n",
       "1   2  乌黑  蜷缩  沉闷  清晰  凹陷  硬滑  0.774  0.376  是\n",
       "2   3  乌黑  蜷缩  浊响  清晰  凹陷  硬滑  0.634  0.264  是\n",
       "3   4  青绿  蜷缩  沉闷  清晰  凹陷  硬滑  0.608  0.318  是\n",
       "4   5  浅白  蜷缩  浊响  清晰  凹陷  硬滑  0.556  0.215  是"
      ]
     },
     "execution_count": 91,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_raw = pd.read_csv('./data/svm/watermelon_3a.csv')\n",
    "data_raw.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>色泽_乌黑</th>\n",
       "      <th>色泽_浅白</th>\n",
       "      <th>色泽_青绿</th>\n",
       "      <th>根蒂_硬挺</th>\n",
       "      <th>根蒂_稍蜷</th>\n",
       "      <th>根蒂_蜷缩</th>\n",
       "      <th>敲声_沉闷</th>\n",
       "      <th>敲声_浊响</th>\n",
       "      <th>敲声_清脆</th>\n",
       "      <th>纹理_模糊</th>\n",
       "      <th>纹理_清晰</th>\n",
       "      <th>纹理_稍糊</th>\n",
       "      <th>脐部_凹陷</th>\n",
       "      <th>脐部_平坦</th>\n",
       "      <th>脐部_稍凹</th>\n",
       "      <th>触感_硬滑</th>\n",
       "      <th>触感_软粘</th>\n",
       "      <th>密度</th>\n",
       "      <th>含糖率</th>\n",
       "      <th>好瓜</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.697</td>\n",
       "      <td>0.460</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.774</td>\n",
       "      <td>0.376</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.634</td>\n",
       "      <td>0.264</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.608</td>\n",
       "      <td>0.318</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.556</td>\n",
       "      <td>0.215</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.403</td>\n",
       "      <td>0.237</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.481</td>\n",
       "      <td>0.149</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.437</td>\n",
       "      <td>0.211</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0.666</td>\n",
       "      <td>0.091</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.243</td>\n",
       "      <td>0.267</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   色泽_乌黑  色泽_浅白  色泽_青绿  根蒂_硬挺  根蒂_稍蜷  根蒂_蜷缩  敲声_沉闷  敲声_浊响  敲声_清脆  纹理_模糊  \\\n",
       "0      0      0      1      0      0      1      0      1      0      0   \n",
       "1      1      0      0      0      0      1      1      0      0      0   \n",
       "2      1      0      0      0      0      1      0      1      0      0   \n",
       "3      0      0      1      0      0      1      1      0      0      0   \n",
       "4      0      1      0      0      0      1      0      1      0      0   \n",
       "5      0      0      1      0      1      0      0      1      0      0   \n",
       "6      1      0      0      0      1      0      0      1      0      0   \n",
       "7      1      0      0      0      1      0      0      1      0      0   \n",
       "8      1      0      0      0      1      0      1      0      0      0   \n",
       "9      0      0      1      1      0      0      0      0      1      0   \n",
       "\n",
       "   纹理_清晰  纹理_稍糊  脐部_凹陷  脐部_平坦  脐部_稍凹  触感_硬滑  触感_软粘     密度    含糖率  好瓜  \n",
       "0      1      0      1      0      0      1      0  0.697  0.460   0  \n",
       "1      1      0      1      0      0      1      0  0.774  0.376   0  \n",
       "2      1      0      1      0      0      1      0  0.634  0.264   0  \n",
       "3      1      0      1      0      0      1      0  0.608  0.318   0  \n",
       "4      1      0      1      0      0      1      0  0.556  0.215   0  \n",
       "5      1      0      0      0      1      0      1  0.403  0.237   0  \n",
       "6      0      1      0      0      1      0      1  0.481  0.149   0  \n",
       "7      1      0      0      0      1      1      0  0.437  0.211   0  \n",
       "8      0      1      0      0      1      1      0  0.666  0.091   1  \n",
       "9      1      0      0      1      0      0      1  0.243  0.267   1  "
      ]
     },
     "execution_count": 92,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = data_raw.copy()\n",
    "data.drop(columns=[\"编号\"], axis=1, inplace=True)\n",
    "cate_dict = {'是':0, '否':1}\n",
    "data['好瓜'] = pd.factorize(data['好瓜'])[0]\n",
    "data_dummies = pd.get_dummies(data.iloc[:, :6])\n",
    "data = pd.concat([data_dummies, data.iloc[:, 6:]], axis=1)\n",
    "data.head(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "metadata": {},
   "outputs": [],
   "source": [
    "train_set, test_set = train_test_split(data, test_size=0.3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "SVC()"
      ]
     },
     "execution_count": 94,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "svm_linear = SVC(kernel='linear')\n",
    "svm_rbf = SVC(kernel='rbf')\n",
    "svm_linear.fit(train_set.iloc[:, :-1], train_set.iloc[:, -1])\n",
    "svm_rbf.fit(train_set.iloc[:, :-1], train_set.iloc[:, -1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "metadata": {},
   "outputs": [],
   "source": [
    "result_linear = svm_linear.predict(test_set.iloc[:, :-1])\n",
    "result_rbf = svm_rbf.predict(test_set.iloc[:, :-1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(0.6666666666666666, 0.6666666666666666)"
      ]
     },
     "execution_count": 96,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "acc_linear = (result_linear == test_set.iloc[:, -1].values).sum() / len(test_set)\n",
    "acc_rbf = (result_rbf == test_set.iloc[:, -1].values).sum() / len(test_set)\n",
    "acc_linear, acc_rbf"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "svm_linear.support_vectors_, svm_rbf.support_vectors_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 98,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAUQAAAEvCAYAAAA92bhfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAXmElEQVR4nO3df4xX9b3n8ee7OMrENtAKW4QBwV7Kqiwp7mj12mzNpS5esyi3V6kmzdpNb1nXNaamoatpwqXEZL0lqZW0u41xjXaTKlxiKfbaYAWbbruxZRAdQEtFo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4Z+NAZbUR8PCLOysvTgCuAF2pY01jej6F1Xw9sT/kT+RKcsr6TPpO7FnixpNrGYgvwH/Ns82VA35CPTeouImYMfh4cEZdSyaey/rGrqOeMTpUzVn9D5TOQd4E/Altz+0zgibx8PpWZwOeBvVSGsg1TX16/BvgDlbOuMus7B9gGvAQ8BXwit3cCD+TlvwR25/dvN/DVEur60PsBrAWuzcuTgX8E9gO/A84v+ffuVPX99/y79jzwNPCvS6ztEeB1YCD/7n0VuAW4JW8P4Ae59t2M8u2MOtV325D37hngL8usL6XklSqSNKilh8ySNB4GoiRlBqIkZQaiJGUGoiRlBqIkZQaiJGUGoiRl/x+5VM6Nr0qhyAAAAABJRU5ErkJggg==",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from sklearn.decomposition import PCA\n",
    "linear_main = PCA(2).fit_transform(svm_linear.support_vectors_)\n",
    "rbf_main = PCA(2).fit_transform(svm_rbf.support_vectors_)\n",
    "plt.figure(figsize=(5, 5))\n",
    "plt.scatter(linear_main[:, 0], linear_main[:, 1], label='linear')\n",
    "plt.scatter(rbf_main[:, 0], rbf_main[:, 1], label='rbf')\n",
    "plt.legend()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 106,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>密度</th>\n",
       "      <th>含糖率</th>\n",
       "      <th>好瓜</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.697</td>\n",
       "      <td>0.460</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.774</td>\n",
       "      <td>0.376</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.634</td>\n",
       "      <td>0.264</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.608</td>\n",
       "      <td>0.318</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.556</td>\n",
       "      <td>0.215</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      密度    含糖率  好瓜\n",
       "0  0.697  0.460   0\n",
       "1  0.774  0.376   0\n",
       "2  0.634  0.264   0\n",
       "3  0.608  0.318   0\n",
       "4  0.556  0.215   0"
      ]
     },
     "execution_count": 106,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_sub = data_raw.iloc[:, -3:].copy()\n",
    "data_sub['好瓜'] = pd.factorize(data_sub['好瓜'])[0]\n",
    "X, Y = data_sub.values[:, :-1], data_sub.values[:, -1]\n",
    "data_sub.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 107,
   "metadata": {},
   "outputs": [],
   "source": [
    "x_train, x_test, y_train, y_test = train_test_split(X, Y, test_size=0.3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "SVC()"
      ]
     },
     "execution_count": 108,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "svm_linear = SVC(kernel='linear')\n",
    "svm_rbf = SVC(kernel='rbf')\n",
    "svm_linear.fit(x_train, y_train)\n",
    "svm_rbf.fit(x_train, y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 109,
   "metadata": {},
   "outputs": [],
   "source": [
    "pred_linear = svm_linear.predict(x_test)\n",
    "pred_rbf = svm_rbf.predict(x_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAlsAAAE/CAYAAABxSAagAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAz60lEQVR4nO3deZhcdZn3//ddVb13J+nsCwRCxLCEPbKpBBAxBFmEGcUZo8Q4DP5kRmQUceYZR3l+OsrMo4zI7wEcAUURRQHjGCREJSwxQECWBA1kMySd0J21053equr+/VGVUN2pTld36tSpqv68rquvq+qc01X36U7u/tQ53/M95u6IiIiISDAiYRcgIiIiUs4UtkREREQCpLAlIiIiEiCFLREREZEAKWyJiIiIBEhhS0RERCRAClsCgJm918xWh12HiIhIuVHYGmbMbIOZXdB3ubs/5e4zwqipLzMbZWZ3m9lWM9tjZq+b2U3pdX82s09m+Z7PmtmK9OMnzMzN7KQ+2zycXn5uIfZDRAor3d86zKwt3T/uNbP6jPX3mll3ev0eM3vBzGZnrL/azBLp9fu+vtvPex1vZovNbIeZ7Uq/1lwzm2JmcTObnuV7Hjaz/0w/djNrNrNYxvqK9DJNgFlmFLYkVJmNJsO3gXrgWGAkcCmwJr3uB8DHs3zPvPS6fV7P3M7MxgBnAS2HXrWIFLFL3L0eOBk4BfhSn/W3pNePAP4v8JCZRTPW/8Hd6zO+ruvnfX4FPA5MBMYD/wi0uvtm4LeketJ+ZjYamEvvPrUTuCjj+UXpZVJmFLYEADM718w2ZTzfYGafN7NXzGy3mf3UzKoz1n/QzF5Kf6JbZmYnZqy7yczW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V9f9Q2FKy7vB/n8KS7n0L1APK0bqX6VpSP2roLfrGQ7M7GPALGB22LUMhZlFgG8BV4dcSr7ESB2KP5fUJ/UnzewEd98VZlFD9FHgXnf/P2Z2Fqm5oWa6ezLswqR8qIcVFfWvMhH0ka3B3CoDO8itMkKWy35gZhcA/wJc6u5dBaptsAbalwZgJvCEmW0gdU56YZEOMM3l97IJWOjuPe6+HnidVPMqNrnsywLgZwDu/gegmtR9x0pNTv+fikC59C9QDyvGHqb+NZz6V8ADzWLAOmAabw+aO77PNp+h9wDTnxVyMFwe9+MUUgMEjw673kPdlz7bP0ERDi4dxO9lDvCD9OOxpA7/jgm79iHuy6PA1enHx5Ia82Bh197P/hxJ/wNML6b3ANPnwq73EH4nRd+/BrEv6mFFth/qX6HtT977VyGKnksqja8F/iW97GZSn5wglW4fBNYAzwFHhf2DHuJ+LAHeAl5Kfy0Mu+ah7kufbYuyUQ3i92KkTim8BrwKXBV2zYewL8cBz6Qb2UvAhWHX3M9+/ATYAvSQ+mS+ALgWuDbjd3J7ej9fLfF/XyXRv3LcF/WwItsP9a9Q9iOQ/qUZ5EVEREQCpBnkRURERAKksCUiIiISIIUtERERkQApbImIiIgESGFLREREJEAKWyIiIiIBUtgSERERCZDCloiIiEiA/n+xuCqHiyqtFQAAAABJRU5ErkJggg==",
      "text/plain": [
       "<Figure size 720x360 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "x, y = np.meshgrid(np.linspace(0, 1, 100), np.linspace(0, 0.5, 100))\n",
    "sampels = np.concatenate([x.reshape(1, -1), y.reshape(1, -1)], axis=0).T\n",
    "predicts_linear = svm_linear.predict(sampels)\n",
    "predicts_rbf = svm_rbf.predict(sampels)\n",
    "plt.figure(figsize=(10, 5))\n",
    "plt.subplot(1, 2, 1)\n",
    "plt.title('Linear SVM')\n",
    "plt.contourf(x, y, predicts_linear.reshape(100, -1))\n",
    "plt.scatter(X[:, 0], X[:, 1], c=Y)\n",
    "plt.scatter(svm_linear.support_vectors_[:, 0], svm_linear.support_vectors_[:, 1], marker='o', c='r')\n",
    "\n",
    "plt.subplot(1, 2, 2)\n",
    "plt.title('RBF SVM')\n",
    "plt.contourf(x, y, predicts_rbf.reshape(100, -1))\n",
    "plt.scatter(X[:, 0], X[:, 1], c=Y)\n",
    "plt.scatter(svm_rbf.support_vectors_[:, 0], svm_rbf.support_vectors_[:, 1], marker='o', c='r')\n",
    "plt.show()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3.9.7 ('torch10')",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  },
  "orig_nbformat": 4,
  "vscode": {
   "interpreter": {
    "hash": "8f5c1b24a4ab56abd916d54534896e4f6d0a89a0daba3b8db7ea16393a780e2e"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
